﻿using System.Xml.Serialization;

namespace TwitterXml
{
    [XmlRootAttribute(ElementName = "user", IsNullable = false)]
    public class User
    {
        #region Private Fields

        private int id;
        private string name;
        private string screen_name;
        private string location;
        private string description;
        private string profile_image_url;
        private string url;
        private bool isprotected;
        private Status status;

        #endregion Private Fields


        #region Public Properties

        [XmlElement(ElementName = "id")]
        public int Id
        {
            get { return id; }
            set { id = value; }
        }

        [XmlElement(ElementName = "name")]
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        [XmlElement(ElementName = "screen_name")]
        public string Screen_Name
        {
            get { return screen_name; }
            set { screen_name = value; }
        }

        [XmlElement(ElementName = "location")]
        public string Location
        {
            get { return location; }
            set { location = value; }
        }

        [XmlElement(ElementName = "description")]
        public string Description
        {
            get { return description; }
            set { description = value; }
        }

        [XmlElement(ElementName = "profile_image_url")]
        public string Profile_Image_Url
        {
            get { return profile_image_url; }
            set { profile_image_url = value; }
        }

        [XmlElement(ElementName = "url")]
        public string Url
        {
            get { return url; }
            set { url = value; }
        }

        [XmlElement(ElementName = "protected")]
        public bool IsProtected
        {
            get { return isprotected; }
            set { isprotected = value; }
        }

        [XmlElement(ElementName = "status", IsNullable = false)]
        public Status Status
        {
            get { return status; }
            set { status = value; }
        }

        #endregion //Public Properties


        #region Constructors

        public User()
        {
        }

        public User(int id, string name, string screen_name, string location, string description, string profile_image_url, string url, bool isprotected)
        {
            this.id = id;
            this.name = name;
            this.screen_name = screen_name;
            this.location = location;
            this.description = description;
            this.profile_image_url = profile_image_url;
            this.url = url;
            this.isprotected = isprotected;
        }

        public User(int id, string name, string screen_name, string location, string description, string profile_image_url, string url, bool isprotected, Status status)
        {
            this.id = id;
            this.name = name;
            this.screen_name = screen_name;
            this.location = location;
            this.description = description;
            this.profile_image_url = profile_image_url;
            this.url = url;
            this.isprotected = isprotected;
            this.status = status;
        }

        #endregion Constructors

    }
}
